package com.gzhryc.shared_device.cdb.core.protocol.v1.msg;

import java.io.Serializable;

public class FAResponse implements Serializable {

	private static final long serialVersionUID = 1L;

	public final static String CMD = "FA";

	private String cmd = CMD;
	private String deviceSn;
	private String messageId;
	private Integer resultCode;

	public FAResponse() {
	}

	public FAResponse(BaseMessage baseMessage) {
		String[] data = baseMessage.getData();
		this.deviceSn = baseMessage.getDeviceSn();
		this.messageId = baseMessage.getMessageId();

		if (data != null) {
			if (data.length >= 1) {
				this.resultCode = Integer.valueOf(data[0]);
			}
		}
	}

	public String getCmd() {
		return cmd;
	}

	public void setCmd(String cmd) {
		this.cmd = cmd;
	}

	public String getDeviceSn() {
		return deviceSn;
	}

	public void setDeviceSn(String deviceSn) {
		this.deviceSn = deviceSn;
	}

	public String getMessageId() {
		return messageId;
	}

	public void setMessageId(String messageId) {
		this.messageId = messageId;
	}

	public Integer getResultCode() {
		return resultCode;
	}

	public void setResultCode(Integer resultCode) {
		this.resultCode = resultCode;
	}
}
